home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Disc to the Future 2
/
Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin
/
MAC
/
MACSHELL
/
MS1
/
MANUAL
< prev
next >
Wrap
Text File
|
1990-04-18
|
44KB
|
1,465 lines
#############################################################################
#
# MANUAL COMPILER FILE
#
# This file contains the manual information for MacShell¬
# To recompile the manual file use
#
# $ man filename -wc
#
# the -w option 'wipes' manual resources
# the -c option compiles the file 'filename'
#
# FORMATING CHARACTERS
#
# '#' begins a comment line, all characters following are ignored.
# '<U> name' begins a usage statment for command 'name'.
# '<M> name' begins a manual statement for command 'name'.
#
# Note : use the '###' markers to limit the line endings (they are the
# size of the minimum window on a compact Mac.
#
#############################################################################
<U> man
man commands - prints detailed explanation of a commands function
<M> man
man [commands]
man prints a detailed explanation of a command's function.
for a simple explanation use the 'usage' command.
To see other summaries, use
man shell
man paths
man patterns
man commands
man characters
man variables
man shortcuts
options
-c compile specified file/s into man and usage text.
-w wipe existing man and usage text resources.
-e echo names on compile.
#############################################################################
<U> usage
usage commands - prints a one line explanation of a commands function
<M> usage
usage commands
usage prints a simple, one line explanation of a command's function.
for a more through explanation use the 'man' command.
options - none
#############################################################################
#
# GENERAL INFORMATION
#
#############################################################################
<M> patterns
MacShell¬ Patterns
* Match any characters including none
? Match any single character
[╔] Match any enclosed character
[a-z] Match any character in range a-z
[╔]+ Match any sequence of enclosed characters
In general patterns can be used in the following specifiers
files
directories
finder types and creators
resource types
menu names
window names
#############################################################################
<M> shell
MacShell¬ Shell Information
MacShell was designed to provide a popular command line shell for application
development that does not require large amounts of disk space and memory.
MacShell uses the UNIX system as its command model. MacShell provides several
'Mac-Like' features that allow customization of environment. For the ultimate
in user configurability we provide a linkable LSC project that you can add you
own commands to.
Command execution
To execute a command: Type the command name into the input pane and hit return.
Launch Applications
Type in the pathname of the application to launch it.
Using Quotes
When specifying paths that include names with embedded spaces, quote the
entire argument with quotes, for example :
$ ls 'Dev Folder' 'My Folder With Spaces'
A short cut to using Quotes is to specify part of the name with a pattern,
for example :
$ ls Dev* My*
Please refer to the printed manual for more information.
#############################################################################
<M> characters
MacShell¬ Special Characters
| Pipe
; Command separator
< Input redirection
> Output file creation
>> Output file append
# Start of comment terminated by newline
space Space separates words.
tab Tab also separates words.
return Return separates commands.
enter Enter separates commands
Quoting conventions
\ Quote the next character in pattern.
'╔' Quote the enclosed except for '
Note : If a trailing quote is not specified the remaining
characters on the line are included in the quoted string.
Please refer to the printed manual for more information.
#############################################################################
<M> variables
MacShell¬ shell vars
UNIX shell vars
$0 The name of the command procedure being executed
$1 The first argument, $2 second, etc.
$HOME Default argument for the cd command
$CDPATH The list of directories that is searched by the CD command
Each directory is separated by a ;.
$PATH A list of directories that contain commands
Each directory is separated by a ;.
$PS1 The primary shell prompt string, by default $.
$PS2 The shell prompt for further input. by default >.
$IFS The set of character used for blank interpretation.
This is usually space, tab and newline.
Macintosh shell vars
$BOOT The volume name of the boot disk
$COMMAND The name of the last command executed
$SHELL The full pathname of the Shell
$SYSTEMFOLDER The full pathname of the system folder
$USER The current user name (initialized to the ╥Chooser╙ name)
$TIME The current time
$DATE The current date
$FREEMEM The amount of free memory in MacShell heap
name=val Set name to specified value
Example :
$ echo $FREEMEM # print the free memory remaining.
Please refer to the printed manual for more information.
#############################################################################
<M> paths
MacShell¬ UNIX paths
// Volume specifier.
/ Root specifier.
. Currrent working directory.
.. Parent working directory.
\ Parent working directory.
... Recursive search specifier.
╔ Recursive search specifier (option-colon).
Path examples:
$ cd //Floppy Move working directory to 'Floppy' root
$ ls -l //* List all volumes on line
$ cat '/HD 80/myfile' Catenate myfile at root of volume 'HD 80'
$ cd \Doc* Move to first directory matching 'Doc*' in parent
directory.
$ ls .../*.c > source List all C source file paths into file 'source'
that are in the current directory and its children.
$ cd -d Use a dialog to set the working directory
Please refer to the printed manual for more information.
#############################################################################
<M> shortcuts
MacShell¬ shortcuts
Double click Select word
Triple click Select line
UpArrow Move selection mark one line above current selection
DownArrow Move selection mark one line below current selection
RightArrow Move selection mark one character to the right
LeftArrow Move selection mark one character to the left
Option-UpArrow Move selection mark to top of file
Option-DownArrow Move selection mark to bottom of file
Option-LeftArrow Move selection mark to left edge of current line
Option-RightArrow Move selection mark to right edge of current line
Help Activate man command
Home Move selection mark and view to top of file
PageUp Move view one page up
PageDown Move view one page down
Command-E Execute selected text.
Command-Period Interupt command (all shells).
Command-D Interupt command (front most shell).
Command-Tab Move from input/output pane to output/input pane.
Command-UpArrow Recall next command from history buffer
Command-RightArrow Recall next command from history buffer
Command-DownArrow Recall last command from history buffer
Command-LeftArrow Recall last command from history buffer
Command-Space Recall last command from history buffer
If a file has the postfix '.script' then that file will be executed as a
shell script (as opposed to opened for editing) when double-clicked from
the Finder or opened from the File menu.
Please refer to the printed manual for more information.
#############################################################################
<M> commands
MacShell¬ UNIX Commands
alias - define command alias
cal - print calendar
cat - catenate and print files and/or standard input
cd - change directories
cmp - compare files
cp - copy files in one of two formats
crypt - encode files
decrypt - decode files
date - print time and date
df - show disk (volume) free space
diff - differential file compare
echo - echo arguments to stdout
find - find files
fgrep - search files for strings
grep - search files for patterns
hd - dump files in hex
ls - list files and directories
man - prints detailed explanation of a commands function
mkdir - make directories
mv - move files in one of two formats
pr - print text files
pwd - print present working directory path
rm - remove files
rmdir - remove directories
set - set shell variables
script - run shell script
size - print the size of data and resource forks
sh - open a new shell
sleep - suspend execution for an interval (Ticks)
touch - update the date last modified of files
tr - translate characters
unalias - undefine command alias
unset - unset (remove) shell variables
usage - prints a one line explanation of a commands function
wc - count characters, words, and lines in text files
MacShell¬ UNIX Extensions
cpt - copy directories (trees)
mvt - move directories (trees)
edit - edit text files
read - read text files
MacShell¬ Macintosh Commands
about - open about dialog
addmenu - add or modify a menu
addsubmenu - add a hierarchical 'sub' menu
clear - erase all shell output
close - close text window
delmenu - remove menu and/or menu items
eject - eject and unmount volume
new - open a new shell or edit window (see prefs)
open - open text files for editing
pagesetup - open page setup dialog
play - play sound files and resources
prefs - set MacShell preferences
print - open print job dialog
quit - quit MacShell¬
restart - restart the Macintosh
revert - revert text window to last version saved.
save - save the contents of window to file
saveas - save the contents of window to new file
setfile - set file attributes
shutdown - shutdown the Macintosh
sound - set sound volume
MacShell¬ Macintosh Development Commands
dumpr - dump resources (RMAKER format)
cmpr - compare resources
cpr - copy resources
dpb - print directory ParamBlockRec information
environ - print information about system environment
fpb - print file ParamBlockRec information
lsr - list resources
mvr - move resources
rmr - remove resources
vpb - print volume ParamBlockRec information
#############################################################################
#
# UNIX COMMANDS
#
#############################################################################
<U> cal
cal [[month] year] - print calendar
<M> cal
cal [[month] year]
cal prints a calendar for the given year. If a month is specified then
only that month is printed. The year can be between 1 and 9999. The
month is a number between 1 and 12. The year can be specified as 1990,
or abbreviated to 90. If neither a month or year is given then the
calendar for the current month is printed.
#############################################################################
<U> cat
cat [-] files - catenate and print files and/or standard input
<M> cat
cat [-] files
cat reads each file in sequence and writes their contents to the standard
output. If not input file is specified or the argument '-' is given then
cat reads from the standard input. Output is buffered.
Patterns may be used in the files specification.
options
- read from the standard input if files are specified.
#############################################################################
<U> cd
cd [option] [path] - change directories
<M> cd
cd [option] [path]
cd changes the current working directory to the specified path. If a
path is not specified then cd uses the shell variable $CDPATH. If the
-d option is used then the path is ignored.
options
-d use dialog to set directory.
-i dirID set directory to dirID.
#############################################################################
<U> cmp
cmp [options] file1 file2 - compare files
<M> cmp
cmp [options] file1 file2
cmp compares two TEXT files. If the files are the same cmp does nothing.
If they differ the byte offset and differing bytes are printed.
options
-l print the line offset and the lines for each difference.
-s print nothing for differing files, output return code only.
#############################################################################
<U> cp
cp format - copy files in one of two formats
<M> cp
cp file1 file2
cp files directory
cp copies files. In the first format file1 is copied to file2. In the
second format files are copied into the specified directory. If file1
or any name in files is a directory the directory is copied. cp refuses
to copy a file onto itself.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> cpt
cpt directory1 directory2 - copy directories (trees)
<M> cpt
cp directory1 directory2
cpt copies directories (trees). cpt copies a directory1 to directory2.
All sub-directories and files are copied. cpt refuses to copy a directory
onto itself.
options - none
#############################################################################
<U> crypt
crypt [options] files - encode files
<M> crypt
crypt [options] files
crypt encrypts characters from the specified file. Encrypted characters
are written to a new file (whose name matches the first file with the
postfix '.crypt'. If no password is supplied a dialog is used to enter it.
A password specified on the command line is not completely secure, as the
password is visible to anyone. You can clear the shells output, and thus
erase the password, with the clear command.
To encrypt a text file:
$ crypt -p pingaling file
options
-p password use the password for encryption
-s suppress .crypt on newly encrypted file
#############################################################################
<U> decrypt
decrypt [options] files - decode files
<M> decrypt
decrypt [options] files
crypt decrypts characters from the specified file. Decrypted characters
are written to a new file (whose name matches the first file with the
postfix '.decrypt'. If no password is supplied a dialog is used to enter it.
A password specified on the command line is not completely secure, as the
password is visible to anyone. You can clear the shells output, and thus
erase the password, with the clear command. Note that if file is not found
decrypt looks for a file named file.crypt. Thus the following commands
perform the same action :
$ decrypt -p pingaling file.crypt
$ decrypt -p pingaling file
options
-p password use the password for encryption
-s suppress .decrypt on newly decrypted file
#############################################################################
<U> date
date - print time and date
<M> date
date
date prints the current time and date.
options - none
#############################################################################
<U> df
df [volumes] - show disk (volume) free space
<M> df
df [volumes]
df prints volume free space information to stdout. If no volume is
specified all online volumes are listed.
Patterns may be used in the volumes specification.
options - none
#############################################################################
<U> diff
diff - differential file compare
<M> diff
diff [options] file1 file2
diff lists the lines that must be changed to make the two files match.
Each mismatch is tagged with a < for the first file and a > for the
second file. diff attempts to resync the files for up to 32 lines.
options
-h do a fast half-hearted job.
#############################################################################
<U> echo
echo - echo arguments to stdout
<M> echo
echo [option] arguments
echo writes the arguments to the standard output separated by the blank
character and followed by a newline.
options
-n no newline is added to the output.
#############################################################################
<U> edit
edit [files] - edit text files
<M> edit
edit [files]
edit opens the specified file/s into a new window/s for editing. If the
specified file cannot be found a new window is created under the filename.
When editing a new file, the command line name is take literatly, that is
no path information is extracted from the file name. If no file is
specified then a new Untitled file is openned for editing.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> find
find files - find files
<M> find
find [options] files
find searches all volumes for the specified files. The path to the files
are printed to standard output. 'find' is equivalent to the command
'ls //*/.../file'. To find all (non-open) applications use :
$ find * -t APPL
Patterns may be used in the files specification.
options
-l list info about files.
-t TYPE where TYPE is a 4 character file type
-c CREA where CREA is a 4 character file creator
#############################################################################
<U> fgrep
fgrep [options] string files - search files for string
<M> fgrep
fgrep [options] string files
fgrep searches files for lines that contain the specified string. Lines
with occurrences of the string are printed.
Patterns may be used in the files specification.
options
-c print a count of matching lines.
-h don't print file name headers.
-i ignore case in making comparisons.
-n each line is proceeded by its line number.
-v display all lines but those matching.
-x only lines that match exactly are printed.
#############################################################################
<U> grep
grep [options] pattern files - search files for pattern
<M> grep
grep [options] pattern files
grep searches files for lines that contain the specified pattern. Lines
with occurances of the pattern are printed. The pattern is a not a ed
pattern, but a standard MacShell pattern (see man patterns).
Patterns may be used in the files specification.
options
-c print a count of matching lines.
-h don't print file name headers.
-i ignore case in making comparisons.
-n each line is proceeded by its line number.
-v display all lines but those matching.
#############################################################################
<U> hd
hd [options] files - dump files in hex
<M> hd
hd [options] files
hd dumps the files in a specified format. if no format is given then
the hex/ascii format is used. Options may be combined, for example -ld
will dump a file as decimal longs and ascii.
Patterns may be used in the files specification.
options
-n suppress ASCII dump.
-l dump file as longs (32 bit ints, 16 bit is default).
-d dump ints in decimal format (HEX is default).
-r dump resource fork (data fork is default).
#############################################################################
<U> ls
ls [options] names - list files and directories
<M> ls
ls [options] names
ls lists for each directory argument, the contents of that directory, for
each file argument, information about the file. When the -l option is
specified, file sizes, flags, creation and modification dates are printed.
Flags are printed as : lowercase = False, uppercase = True.
Patterns may be used in the names specification.
options
-c CREA list only entries with finder creator CREA.
-d list directories only.
-l long listing : sizes and attributes.
L Locked
V Invisible
B Bundle
S System
I Inited
D Desktop
M Shared
A Always switch launch
-t TYPE list only entries with finder type TYPE.
Note : when using the long list format, ls searches directories counting
file sizes to compute the size of a directory. When searching very large
directories this format may take several seconds. When listing volumes
in the long format the volume size may be listed as 'M' bytes indicating
megabytes = 1048576 bytes. Volumes and directories are given fake type
and creators (in the long format) of 'Volm' and 'Fldr'.
#############################################################################
<U> mkdir
mkdir directories - make directories
<M> mkdir
mkdir directories
mkdir creates the specified directories. mkdir will not replace existing
directories with new ones.
options - none
#############################################################################
<U> mv
mv format - move files in one of two formats
<M> mv
mv file1 file2
mv files directory
mv moves files. In the first format file1 is moved to file2. In the
second format files are moved into the specified directory. If file1
or any name in files is a directory the directory is moved. mv refuses
to copy a file onto itself. mv will move files between volumes.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> mvt
mvt directory1 directory2 - move directories (trees)
<M> mvt
mv directory1 directory2
mvt moves directories (trees). mvt moves a directory1 to directory2.
All sub-directories and files are moved. mvt refuses to move a
directory onto itself.
options - none
#############################################################################
<U> pr
pr [options] files - print text files
<M> pr
pr [options] files
pr prints text files in the specified format. The default format can
be specified with the page setup and print job dialogs. The initial
format is printer dependent.
Patterns may be used in the files specification.
For two column printing (on a LaserWriter) use:
$pr file -2s
then select a scaling of 50% from your printers page-set-up dialog.
options
-2 print text in two columns. use -s to set scaling.
-3 print text in three columns. use -s to set scaling.
-l print in landscape mode (LaserWriter compatibles).
-n suppress headers.
-s do pagesetup dialog.
-j do print job dialog.
#############################################################################
<U> pwd
pwd - print present working directory path
<M> pwd
pwd
pwd prints the path to the present working directory to the standard
output. Normally this command is unnecessary as the shells window title
is the full path to the present working directory.
#############################################################################
<U> read
read files - read text files
<M> read
read files
read opens the specified file/s into a new window/s for reading.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> rm
rm [options] files - remove files
<M> rm
rm [options] files
rm removes the specified files. If the -r option is specified then rm
will recursively delete all files within a directory and then the
directory itself.
Patterns may be used in the files specification.
options
-r recursively delete a directory.
#############################################################################
<U> rmdir
rmdir [options] directories - remove directories
<M> rmdir
rmdir [options] directories
rmdir removes the specified directories. rmdir will only remove empty
directories unless the -f option is specified.
options
-f force the removal of all sub files and directories
#############################################################################
<U> set
set [names] - set shell variables
<M> set
set [names]
set sets shell variables from the specified names. Each name entry is in
the format VARIABLE=VALUE. Type 'man shell' for more information on
shell variables.
options - none
#############################################################################
<U> sh
sh - open a new shell
<M> sh
sh - open a new shell
sh opens a new shell in the current directory.
options - none
#############################################################################
<U> script
script [options] files - run shell script
<M> script
script [options] files
script executes text files as shell scripts. Normally this command is not
used as typing the scripts name is sufficient to execute it.
options
-v verbose : echo the scripts commands to the shell.
#############################################################################
<U> size
size files - print the size of data and resource forks
<M> size
size files
size prints the disk space used by a files data and resource forks.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> sleep
sleep time - suspend execution for an interval (Ticks)
<M> sleep
sleep time
sleep suspends execution for the given time. The time is specified in
60th's of a second (Ticks).
options - none
#############################################################################
<U> touch
touch files - update the date last modified of files
<M> touch
touch files
touch sets the modified time and date of the specified files to the
current time and date.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> tr
tr [options] [string1 [string2]] - translate characters
<M> tr
tr [options] [string1 [string2]]
tr copies characters from the standard input to the standard output with
substitution or deletion of specified characters. Characters specified
in string1 are mapped into corresponding characters in string2. When
string2 is shorter than string1 it is extended to the length of string1
by replicating the last character in string2. If either string contains
the notation a-z then the range of characters is used. A '\-' indicates
the dash character, etc.
options
-d delete the input characters that match string1
-s squeeze all strings of repeated characters into a single char.
#############################################################################
<U> unset
unset names - unset (remove) shell variables
<M> unset
unset names
unset removes the specified shell variables. Type 'man shell' for more
information on shell variables.
options - none
#############################################################################
<U> wc
wc [options] [files] - count characters, words, and lines in text files
<M> wc
wc [options] [files]
wc counts characters, words, and lines in text files.
Patterns may be used in the files specification.
options
-c count characters.
-w count words.
-l count lines.
-f count files.
#############################################################################
#
# MACINTOSH SPECIFIC COMMANDS
#
#############################################################################
<U> new
new - open a new shell
<M> new
new
new opens a new shell window to the current working directory.
new is equivalent to selecting the 'New' item in the 'File' menu.
options - none
#############################################################################
<U> addmenu
addmenu menu [item [command]] - add or modify a menu
<M> addmenu
addmenu menu [item [command]]
addmenu adds a new menu and/or item and optionally associates a command
string with that menu item. If the menu/item exist, addmenu modifies the
item to the new information. The item specification can contain any of
the standard Macintosh menu manager meta-characters :
/<char> use <char> as the keyboard equivalent for the item.
( item it disabled. normal use is '(-' for this option.
!<char> use <char> as a item mark.
^n use <char> as an index for a menu item ICON.
<style stylize item with one of the following style characters :
B Bold
I Italic
U Underline
O Outline
S Shadow
A further explanation of meta-characters and their use can be found in
Inside Macintosh, volume 1, page 346. Use of the ';' meta-character will
add an additional non-functional menu item and thus should not be used.
command is a simple command or a complex command specified as a quoted
string. Several shell commands can be specified in the command string,
for example:
$ addmenu Print 'All Source' 'pr /myProj/.../*.c'
will create an menu item that will print all 'C' source files in the
directory myProj (and it's sub-directories). To add a hierarchical menu
use the addsubmenu command.
options - none
#############################################################################
<U> addsubmenu
addsubmenu menu item submenu [subitem [command]] - add a hierarchical menu
<M> addsubmenu
addsubmenu menu item submenu [subitem [command]]
addsubmenu adds a new hierarchical menu and/or item and optionally
associates a command string with that menu item. If the menu/item exist,
addmenu modifies the item to the new information. The item specification
can contain any of the standard Macintosh menu manager meta-characters.
See addmenu for meta-character and command information.
options - none
#############################################################################
<U> delmenu
delmenu menu [item] - remove menu and/or menu items
<M> delmenu
delmenu menu
delmenu removes menus created with the addmenu command. If an item is
specified the item and its associated command string is removed.
options - none
#############################################################################
<U> open
open [files] - open text files for editing
<M> open
open [files]
open is the equivalent of the 'Open╔' item in the File menu. If files are
specified the files are openned for editing. If no files are specified then
the user is prompted with the open file dialog.
options - none
#############################################################################
<U> close
close window- close text window
<M> close
close window
close is the equivalent of the 'Close' item in the File menu. window is
the title of a current text or shell window. Patterns may be used in the
window specification, for example:
$ close *.c
will close all open 'C' source windows.
options - none
#############################################################################
<U> save
save window- save the contents of window to file
<M> save
save window
save is the equivalent of the 'Save' item in the File menu. window is
the title of a current text or shell window. Patterns may be used in the
window specification, for example:
$ save *.h
will save the contents of all open 'C' header windows.
options - none
#############################################################################
<U> saveas
saveas window- save the contents of window to new file
<M> saveas
saveas window
saveas is the equivalent of the 'Save As╔' item in the File menu. window is
the title of a current text or shell window. Patterns may be used in the
window specification, for example:
$ saveas *.h
will prompt the user to save the contents of all open 'C' header windows
to new file names.
options - none
#############################################################################
<U> restart
restart - restart the Macintosh.
<M> restart
restart
restart causes the macintosh to reboot.
options - none
#############################################################################
<U> shutdown
shutdown - shutdown the Macintosh.
<M> shutdown
shutdown
shutdown causes the macintosh to shutdown.
options - none
#############################################################################
<U> revert
revert window - revert text window to last version saved.
<M> revert
revert window
revert is the equivalent of the 'Revert' item in the File menu. window is
the title of a current text or shell window. Patterns may be used in the
window specification.
options - none
#############################################################################
<U> quit
quit - quit MacShell¬
<M> quit
quit
quit is the equivalent of the 'Quit' item in the File menu.
options - none
#############################################################################
<U> clear
clear - erase all shell output
<M> clear
clear
clear deletes all text in the shells output window. clear is useful for
maintaining a minimum memory profile.
options - none
#############################################################################
<U> pagesetup
pagesetup - open page setup dialog
<M> pagesetup
pagesetup
pagesetup is the equivalent of the 'Page Setup╔' item in the File menu.
pagesetup opens the Macintosh page setup dialog for the selected printer.
If no printer was selected from the chooser then pagesetup does nothing.
options - none
#############################################################################
<U> prefs
prefs [options] - set MacShell preferences
<M> prefs
prefs [options]
prefs sets MacShell user preferences. If no options are specified a dialog
is used to set the preferences.
options
-A use advanced scroll bars.
-a use standard scroll bars.
-c CREA set finder creator for new TEXT files.
-P use '.profile' on startup.
-p do not use '.profile' on startup.
-N use '.profile' on newly openned shells.
-n do not use '.profile' on newly openned shells.
-s 'New' menu item opens shell.
-f 'New' menu item opens empty file.
-l limit set character limit on open shells.
Minimum limit is 4k, maximum limit is 512k.
-i Case sensitive string and pattern compares.
-I Case insensitive string and pattern compares.
#############################################################################
<U> print
print - open print job dialog
<M> print
print
print is the equivalent of the 'Print╔' item in the File menu.
options - none
#############################################################################
<U> about
about - open about dialog
<M> about
about
about is the equivalent of the 'About MacShell' item in the Apple menu.
options - none
#############################################################################
<U> setfile
setfile [options] files - set file attributes
<M> setfile
setfile [options] files
setfile sets file finder attributes. setfile is useful for setting the
type and creator finder fields in files.
Patterns may be used in the files specification.
options
-a attributes Set attributes (lowercase = FALSE, uppercase = TRUE).
L Locked
V Invisible
B Bundle
S System
I Inited
D Desktop
M Shared
A Always switch launch
-c creator Set finder creator.
-t type Set finder type.
#############################################################################
<U> fpb
fpb files - print file ParamBlockRec information
<M> fpb
fpb files
fpb prints Macintosh (File Manager) file information. The file
information is the same information returned by a PBGetFInfo call.
Patterns may be used in the files specification.
options - none
#############################################################################
<U> dpb
dpb [directories] - print directory ParamBlockRec information
<M> dpb
dpb [directories]
dpb prints Macintosh (File Manager) directory information. The directory
information is the same information returned by a PBGetCatInfo call. If
no directory is specified, information on the current directory is printed.
Patterns may be used in the directories specification.
options - none
#############################################################################
<U> vpb
vpb [volumes] - print file ParamBlockRec information
<M> vpb
vpb [volumes]
vpb prints Macintosh (File Manager) volume information. The volume
information is the same information returned by a PBGetVInfo call. If
no volume is specified, information on the current volume is printed.
Patterns may be used in the directories specification.
options - none
#############################################################################
<U> environ
environ - print information about system environment
<M> environ
environ
environ prints information obtained through the trap SysEnvirons. This
command provides information about the machine you are running on.
options - none
#############################################################################
<U> sound
sound [options] level - set sound volume
<M> sound
sound [options] level
sound sets the system sound volume to the value specified in level. level
must be a character in the range '0' to '7'.
options
-s do not play the current sound (SysBeep) at the new level.
#############################################################################
<U> play
play [options] files - play sound files and resources
<M> play
play [options] files
play opens and plays 'snd ' resources. If a file is not specified then
the current sound is played. If a file is specified then all sounds in
the file are played. If a resource ID is specified then sounds with the
resource ID are played. Make sure the ID is correct, no checking is
done on the ID string. Example :
$play //*/╔/* -v
will play and list every sound on all online volumes.
Patterns may be used in the files specification.
options
-i ID play 'snd ' resource ID.
-v list resource information as sounds are played.
#############################################################################
<U> eject
eject [options] volumes - eject and unmount volume
<M> eject
eject [options] volumes
eject ejects the specified floppy volumes. Patterns may be used in the
volumes specification.
options
-u unmount volume once ejected.
#############################################################################
<U> alias
alias [name[=command]] - define or display command alias
<M> alias
alias [name[=command]]
alias defines a string that will be substituted for the alias 'name' on the
command line. alias is used to customize the command environment. commands
that are alias's are global and work in all open shells. You cannot alias
the alias command. If no '=' is specified then the command for the specified
alias is printed. If no arguments are specified then all alias's are
printed, one per line.
An example :
$ alias dir=ls
makes the transition to UNIX a little easier for MSDOS users.
options - none
#############################################################################
<U> unalias
unalias names - undefine command alias
<M> unalias
unalias names
unalias 'undefines' command alias.
options - none
#############################################################################
<U> lsr
lsr [options] files - list resources
<M> lsr
lsr [options] files - list resources
lsr lists resource information in the specified files. Resources are not
loaded into memory, thus very large files can be examined. If a resource
fork is damaged lsr may run out of memory.
lsr lists the following resource information : Type, Type index, Type ID,
Flags, Size and Name.
The resource flags are printed as : lowercase = False, uppercase = True.
The flags are :
S System Ref
H Load into system heap.
U Purgable.
L Locked.
R Protected.
P Preload.
C Changed.
For example to search for virus resources on all volumes use :
$ lsr //*/╔/* -t nVIR
options
-n name list resources of the given name (requires type).
-i ids list resources of the given id's (requires type).
where ids can be 'id' or 'startid,endid'
-t TYPE list resources of the given type.
#############################################################################
<U> cpr
cpr file1 type1 id1 file2 [type2 [id2]] - copy resources
<M> cpr
cpr file1 type1 id1 file2 [type2 [id2]]
cpr copies resources from file1 to file2. cpr copies the resource of type1
and id1 to a resource of type2 id2. If id2 is not specified then id2 will be
the same as id1. If type2 and id2 are not specified then type1 and id1 will
be used. If file2 is specified as '.' then file1 is used as file2.
options - none
#############################################################################
<U> mvr
mvr file1 type1 id1 file2 [type2 [id2]] - move resources
<M> mvr
mvr file1 type1 id1 file2 [type2 [id2]]
mvr moves resources from file1 to file2. mvr moves the resource of type1
and id1 to a resource of type2 id2. If id2 is not specified then id2 will be
the same as id1. If type2 and id2 are not specified then type1 and id1 will
be used. If file2 is specified as '.' then file1 is used as file2.
options - none
#############################################################################
<U> cmpr
cmpr file1 type1 id1 file2 [type2 [id2]] - compare resources
<M> cmpr
cmpr file1 type1 id1 file2 [type2 [id2]]
cpr copies resources from file1 to file2. cpr copies the resource of type1
and id1 to a resource of type2 id2. If id2 is not specified then id2 will be
the same as id1. If type2 and id2 are not specified then type1 and id1 will
be used. If file2 is specified as '.' then file1 is used as file2.
options - none
#############################################################################
<U> rmr
rmr file type [id] - remove resources
<M> rmr
rmr file type [id]
rmr removes resources from the specified file. The resource with the given
type and id is removed. If id is not specified then all resources of the
given type will be remove.
options - none
#############################################################################
<U> grepr
grepr [options] string files - search resources in files for string
<M> grepr
grepr [options] string files
grepr searches resources in files for data that match the specified string.
Occurrences of the string match are printed. The string may be specified in
a hex format. Searches are performed on byte boundaries. For example,
$ grepr -h -t CODE 4E75444F5553 myApplication
looks for an instruction sequence in the CODE resources of myApplication.
Patterns may be used in the files specification.
options
-h pattern is in hex format
-n name search resources of the given name.
-i ids search resources of the given id's.
where ids can be 'id' or 'startid,endid'
-t TYPE search resources of the given type.
#############################################################################
<U> dumpr
dumpr files [options] - dump file(s) resources in RMAKER format
<M> dumpr
dumpr files [options]
dumpr prints resource information in RMAKER format from the specified
files. dumpr is a resource decompiler. Output from dumpr can be input
into RMAKER to create a resource file. Refer to your THINK C manual,
appendix D, page 483 (Version 4.0) for more information on RMAKER.
options
-n name dump resources of the given name.
-i ids dump resources of the given id's.
where ids can be 'id' or 'startid,endid'
-t TYPE dump resources of the given type.
#############################################################################
<U> clean
clean - clean up windows
<M> clean
clean
clean 'cleans up' MacShells windows.
options - none
#############################################################################